#pragma once

#include <string>

#include "../SQLExprImpl.h"
#include "SQLNumericLiteralExpr.h"
class SQLASTVisitor;

class SQLNumberExpr : virtual public SQLNumericLiteralExpr
{

private:
  double number;
  char *chars;

public:
  static string_ptr class_;
  SQLNumberExpr();
  virtual ~SQLNumberExpr();

  SQLNumberExpr(double number);
  SQLNumberExpr(char *chars) { this->chars = chars; }
  SQLNumberExpr(char *chars, SQLObject_ptr parent)
  {
    this->chars = chars;
    this->parent = parent;
  }
  SHAREDOBJECT(SQLNumberExpr);

  double getNumber();

  void setNumber(double number);

  void output(std::stringstream *buf);

  // int hashCode();
  // BOOL_ptr equals(Object obj);
  string_ptr getLiteral();
  // SQLNumberExpr* clone();
  virtual SQLObject_ptr clone();

protected:
  void accept0(SQLASTVisitor_ptr visitor);
};
